import { get, post } from './index'

// 中水回用设施点检 API (后端命名 bizFacilityGraywate 注意拼写 graywate)
// 参考小程序: /api/form/bizFacilityGraywate/get/{id}  /add

// 详情（按 id 查询）
export const getGraywaterDetail = (id) => get(`/api/form/bizFacilityGraywate/get/${id}`)

// 最近10天内上报记录（如果后端存在此接口）
export const getNearDataGraywater = (beginTime, pollutionSourceId) => {
	return post(`/api/form/bizFacilityGraywate/getNearData`, { beginTime, pollutionSourceId })
}

// 新增
export const addGraywaterCheck = (formData) => post(`/api/form/bizFacilityGraywate/add`, formData)

export default {
	getGraywaterDetail,
	getNearDataGraywater,
	addGraywaterCheck,
}
